
$(function() {
	
	$("input[id^='customer_s']:visible").autocomplete(Test.customer);
	
	Tip.emp('业务员');
	
	$("select[id^='emp_t_s']:visible").change(function() {
		var label = $("label[id^='label_emp_t']:visible");
		var a = $(this).val();
		if (a == 'emp') {
			label.html("业务员：");
		} else if (a == 'engineer') {
			label.html("工程师：");
		} else if (a == 'oper') {
			label.html("录入员：");
		}
	});
	
	$("input[id^='engineer_s']:visible").autocomplete(Test.emp);
	
	$("select[id^='type_s']:visible").multiselect({
		minWidth: 140,
		selectedList: 4
	}).multiselect("uncheckAll");
});

var InItem = {
	dialog_add_: function (url, title, xy) {
		result = Common.result();
		$('#dialog_add').dialog('option', 'buttons', {	
			"关闭": function() { 
				$(this).dialog("close");
			},			
			
			"添加": function() {				
				if (!confirm("确认是否添加？")) {
					return false;
				}				
	
				var form = $("#form_add")[0];
	
				var body = { };
				body.in_ = form.in_.value;
				body.emp = form.emp.value;
				body.engineer = form.engineer.value;
				
				body.currency = form.currency.value;
				body.total = form.total.value;
				body.amount = form.amount.value;
				body.rate = form.rate.value;
				body.rmb = form.rmb.value;
				
				body.date1 = form.date1.value;
				body.date = form.date.value;
				
				body.name = form.name.value;
				body.type = form.type.value;				
				body.content = form.content.value;			
									
				$(this).dialog("close");
	
				$.post('finance.php?do=InItem.addPost', body, function(data) {
					$(result).html(data);
				});
			}
		});
	
		dialog_add(url, title, xy);
	},
	
	popup: function (e, p2, id, status) {
		$.cookie('id_', id);

		p2 = query(p2);
		$.cookie('p2', p2);

		var c1 = 'finance.php?do=InItem.edit&id=' + id;
		var c2 = 'finance.php?do=InItem.view&id=' + id;
		var c3 = 'finance.php?do=InItem.out&id=' + id;
				
		var cs = 'finance.php?do=InItem.status&id=' + id + p2;
		
		var a1 = ['编辑信息', 'url', 'InItem.dialog_edit_', '650x420'];		
		var a2 = ['查看信息', 'url', 'Common.dialog_view_', '650x420'];
		var a3 = ['关联成本', 'url', 'InItem.dialog_out', '650x420'];
				
		if (status == '1') {			
			var b1 = ['开票信息', 'url', 'InItem.dialog_invoice', '700x420'];
			var d1 = 'finance.php?do=InItem.invoice&id=' + id + p2;
			
			var b2 = ['确认收款', 'url', 'InItem.dialog_begin', '700x420'];
			
			var d2 = 'finance.php?do=InItem.finish&id=' + id + p2;
			var b3 = ['完成收款', 'url', 'InItem.dialog_finish', '700x420'];
			
			var s = d1 + ", " + d2 + ", " + d2 + ", " + c1 + ", " + c2 + ", " + c3;

			return this.popup_(e, [b1, b2, b3, a1, a2, a3], s);
		}
		
		if (status == '2') {
			var d1 = 'finance.php?do=InItem.finish&id=' + id + p2;
			var b1 = ['完成收款', 'url', 'InItem.dialog_finish', '700x420'];				
		
			var s = d1 + ", " + c1 + ", " + c2 + ", " + c3;

			return this.popup_(e, [b1, a1, a2, a3], s);
		}
		
		var d1 = 'finance.php?do=InItem.commission&id=' + id + p2;
		var d2 = 'finance.php?do=Commission.add&id=' + id + p2;
		
		var b1 = ['提成情况', 'url', 'Common.dialog_view_', '700x420'];		
		var b2 = ['添加提成', 'url', 'InItem.dialog_commission_', '700x420'];		

		var s = d1 + ", " + d2 + ", " + c1 + ", " + c2 + ", " + c3;

		return this.popup_(e, [b1, b2, a1, a2, a3], s);
	},

	popup_: function (e, a, s) {
		var id = $.cookie('id_');
		
		var c3 = 'finance.php?do=InItem.copy&id=' + id;		
		var a3 = ['复制信息', 'url', 'InItem.dialog_copy_', '700x420'];
		
		var ss = 'finance.php?do=InItem.ss&id=' + id;
		var bb = ['修改状态', 'url', 'InItem.dialog_ss', '400x200'];
		
		s += ", " + c3 + ", " + ss;
		a.push(a3);
		a.push(bb);
		
		return popup(e, a, s);
	},

	/**
	 * 修改状态
	 */
	dialog_ss: function (url, title, xy) {
		var result = Common.result();
		$.getJSON('finance.php?do=InItem.audit&item=147', function(json) {
			if (json.status == 1) {
				$('#dialog_edit').dialog('option', 'buttons', {
					"关闭": function() {
						$(this).dialog("close");
					},

					"修改": function() {
						if (!confirm("确认是否提交？")) {
							return false;
						}

						var form = $("#form_edit")[0];

						var body = {};
						body.id = form.id.value;
						body.field = form.field.value;
						body.data = form.data.value;
						body.status = form.status.value;

						$(this).dialog("close");

						var url = 'finance.php?do=InItem.ssPost';
						var p2 = $.cookie('p2');
						if (p2 != null) {
							url += p2;
						}

						$.post(url, body, function(data) {
							$(result).html(data);
						});
					}
				});

				dialog_edit(url, title, xy);
			} else {
				_error();
			}
		});
	},

	dialog_edit_: function (url, title, xy) {
		var result = Common.result();
		$('#dialog_edit').dialog('option', 'buttons', {			
			"关闭": function() { 
				$(this).dialog("close");
			},
			
			"提交": function() {
				if (!confirm("确认是否提交？")) {
					return false;
				}
	
				var form = $("#form_edit")[0];
				
				var body = { };
				body.id = form.id.value;
				body.in_ = form.in_.value;
				body.transaction = form.transaction.value;
				body.engineer = form.engineer.value;
				
				body.currency = form.currency.value;
				body.total = form.total.value;
				body.amount = form.amount.value;
				body.rate = form.rate.value;
				body.rmb = form.rmb.value;
				
				body.cost = form.cost.value;
				body.profit = form.profit.value;
				
				body.date1 = form.date1.value;
				body.date = form.date.value;				
				
				body.name = form.name.value;
				body.type = form.type.value;
				body.content = form.content.value;
								
				$(this).dialog("close");
	
				var url = 'finance.php?do=InItem.editPost';
				var p2 = $.cookie('p2');
				if (p2 != null) {
					url += p2;
				}
	
				$.post(url, body, function(data) {
					$(result).html(data);
				});
			}
		});
	
		dialog_edit(url, title, xy);
	},
	
	dialog_copy_: function (url, title, xy) {
		var result = Common.result();
		$('#dialog_edit').dialog('option', 'buttons', {			
			"关闭": function() { 
				$(this).dialog("close");
			},
			
			"复制": function() {
				if (!confirm("确认是否提交？")) {
					return false;
				}
	
				var form = $("#form_edit")[0];
				
				var body = { };
				
				body.customer = form.customer.value;
				body.transaction = form.transaction.value;
				
				body.in_ = form.in_.value;
				body.emp = form.emp.value;
				body.engineer = form.engineer.value;
				
				body.currency = form.currency.value;
				body.total = form.total.value;
				body.amount = form.amount.value;
				body.rate = form.rate.value;
				body.rmb = form.rmb.value;
				
				body.date1 = form.date1.value;
				body.date = form.date.value;
				
				body.name = form.name.value;
				body.type = form.type.value;				
				body.content = form.content.value;
				
				$(this).dialog("close");
	
				var url = 'finance.php?do=InItem.addPost';
	
				$.post(url, body, function(data) {
					$(result).html(data);
				});
			}
		});
	
		dialog_edit(url, title, xy);
	},
	
	dialog_out: function (url, title, xy) {
		var result = Common.result();
		$('#dialog_edit').dialog('option', 'buttons', {			
			"关闭": function() { 
				$(this).dialog("close");
			},
			
			"提交": function() {
				if (!confirm("确认是否提交？")) {
					return false;
				}
	
				var d = new Array();
				
				var foo = [];
				$('#right option').each(function(i, n) {
					var s = $(n).val();
					
					var a = s.split('_');
					d.push(a[0]);
					
					foo[i] = a[1];
				});
				
				var cc = '';
				for (i = 0; i < d.length; i++) {
					if (cc.length > 0 && cc != d[i]) {
						alert("操作有误，必须选择同一工程师的支出明细！");
						return false;
					}
					
					cc = d[i];
				}
				
				var form = $("#form_edit")[0];
				
				var body = { };
				body.id = form.id.value;
				body.list = foo.join(",");
				
				$(this).dialog("close");
	
				var url = 'finance.php?do=InItem.outPost';
				var p2 = $.cookie('p2');
				if (p2 != null) {
					url += p2;
				}
	
				$.post(url, body, function(data) {
					$(result).html(data);
				});
			}
		});
	
		dialog_edit(url, title, xy);
	},
	
	dialog_profit: function (url, title, xy) {
		var result = Common.result();
		$('#dialog_edit').dialog('option', 'buttons', {			
			"关闭": function() { 
				$(this).dialog("close");
			},
			
			"提交": function() {
				if (!confirm("确认是否提交？")) {
					return false;
				}
	
				var form = $("#form_edit")[0];
				
				var body = { };
				body.id = form.id.value;
				body.profit = form.profit.value;
				body.content = form.content.value;
				
				$(this).dialog("close");
	
				var url = 'finance.php?do=InItem.profitPost';
				var p2 = $.cookie('p2');
				if (p2 != null) {
					url += p2;
				}
	
				$.post(url, body, function(data) {
					$(result).html(data);
				});
			}
		});
	
		dialog_edit(url, title, xy);
	},
	
	list_start: function (url, view) {
		$.getJSON('finance.php?do=InItem.audit&item=147', function(json) {
			if (json.status == 1) {
				if (confirm("是否要开始收款？")) {
					list(url, view);
				}
			} else {
				_error();
			}
		});
	},
	
	dialog_invoice: function (url, title, xy) {
		var result = Common.result();
		$.getJSON('finance.php?do=InItem.audit&item=147', function(json) {
			if (json.status == 1) {
				$('#dialog_edit').dialog('option', 'buttons', {
					"关闭": function() {
						$(this).dialog("close");
					},

					"提交": function() {
						if (!confirm("确认是否提交？")) {
							return false;
						}

						var form = $("#form_edit")[0];

						var body = {};
						body.id = form.id.value;
						
						body.invoice = form.invoice.value;
						body.amount = form.amount.value;						
						body.rate = form.rate.value;
						body.rmb = form.rmb.value;
						
						body.date1 = form.date1.value;
						body.date = form.date.value;						
						
						body.type = form.type.value;						
						body.content = form.content.value;
						body.status = 2;

						$(this).dialog("close");

						var url = 'finance.php?do=InItem.invoicePost';
						var p2 = $.cookie('p2');
						if (p2 != null) {
							url += p2;
						}

						$.post(url, body, function(data) {
							$(result).html(data);
						});
					}
				});

				dialog_edit(url, title, xy);
			} else {
				_error();
			}
		});
	},
	
	dialog_begin: function (url, title, xy) {
		var result = Common.result();
		$.getJSON('finance.php?do=InItem.audit&item=147', function(json) {
			if (json.status == 1) {
				$('#dialog_edit').dialog('option', 'buttons', {
					"关闭": function() {
						$(this).dialog("close");
					},

					"确认收款": function() {
						if (!confirm("确认是否提交？")) {
							return false;
						}

						var form = $("#form_edit")[0];

						var body = {};
						body.id = form.id.value;
						
						body.transaction = form.transaction.value;
						body.amount = form.amount.value;						
						body.rate = form.rate.value;
						body.rmb = form.rmb.value;
						
						body.date1 = form.date1.value;
						body.date = form.date.value;						
						
						body.type = form.type.value;						
						body.content = form.content.value;
						body.status = 2;

						$(this).dialog("close");

						var url = 'finance.php?do=InItem.finishPost';
						var p2 = $.cookie('p2');
						if (p2 != null) {
							url += p2;
						}

						$.post(url, body, function(data) {
							$(result).html(data);
						});
					}
				});

				dialog_edit(url, title, xy);
			} else {
				_error();
			}
		});
	},
	
	dialog_finish: function (url, title, xy) {
		var result = Common.result();
		$.getJSON('finance.php?do=InItem.audit&item=147', function(json) {
			if (json.status == 1) {
				$('#dialog_edit').dialog('option', 'buttons', {
					"关闭": function() {
						$(this).dialog("close");
					},

					"完成收款": function() {
						if (!confirm("确认是否提交？")) {
							return false;
						}

						var form = $("#form_edit")[0];

						var body = {};
						body.id = form.id.value;
						
						body.transaction = form.transaction.value;
						body.amount = form.amount.value;						
						body.rate = form.rate.value;
						body.rmb = form.rmb.value;
						
						body.date1 = form.date1.value;
						body.date = form.date.value;						
						
						body.type = form.type.value;						
						body.content = form.content.value;
						body.status = 3;

						$(this).dialog("close");

						var url = 'finance.php?do=InItem.finishPost';
						var p2 = $.cookie('p2');
						if (p2 != null) {
							url += p2;
						}

						$.post(url, body, function(data) {
							$(result).html(data);
						});
					}
				});

				dialog_edit(url, title, xy);
			} else {
				_error();
			}
		});
	},
	
	dialog_commission_: function (url, title, xy) {
		var result = Common.result();
		$('#dialog_add').dialog('option', 'buttons', {	
			"关闭": function() { 
				$(this).dialog("close");
			},			
			
			"添加": function() {				
				if (!confirm("确认是否添加？")) {
					return false;
				}				
	
				var form = $("#form_add")[0];
	
				var body = { };
				
				body.in_item = form.in_item.value;
				body.customer = form.customer.value;				
				body.date = form.date.value;
				
				body.rate = form.rate.value;
				body.rmb = form.rmb.value;
				
				body.currency = form.currency.value;				
				body.income = form.income.value;
				
				body.cost = form.cost.value;
				body.profit = form.profit.value;
				body.amount = form.amount.value;				
				
				body.percent = form.percent.value;
				body.type2 = form.type2.value;
				
				body.name = form.name.value;
				body.type = form.type.value;
				body.content = form.content.value;
				body.emp = form.emp.value;
									
				$(this).dialog("close");
	
				$.post('finance.php?do=Commission.addPost', body, function(data) {
					alert("添加成功！");
					// $(result).html(data);
				});
			}
		});
	
		dialog_add(url, title, xy);
	},
	
	popup_all: function (e, p2) {
		p2 = query(p2);
		$.cookie('p2', p2);

		var c1 = 'finance.php?do=InItem.delete' + p2;
		
		var c2 = 'finance.php?do=InItem.batch_invoice';
		var c3 = 'finance.php?do=InItem.batch_begin';
		var c4 = 'finance.php?do=InItem.batch_finish';		
		var c5 = 'finance.php?do=InItem.batch_check';
		
		var c9 = 'finance.php?do=InItem.xls' + p2;
			
		var a1 = ['删除信息', 'url', 'Common.list_delete'];
		var a2 = ['开票信息', 'url', 'InItem.dialog_batch_invoice', '800x450'];
		var a3 = ['开始收款', 'url', 'InItem.dialog_batch_begin', '800x450'];
		var a4 = ['完成收款', 'url', 'InItem.dialog_batch_finish', '800x450'];
		
		var a5 = ['完成对帐', 'url', 'InItem.dialog_batch_check', '800x450', '完成对帐'];

		var a9 = ['导出Excel', 'url', 'jswin', '1024x768'];
		
		var s = c1 + ", " + c2 + ", " + c3 + ", " + c4 + ", " + c5 + ", " + c9;

		return popup(e, [a1, a2, a3, a4, a5, a9], s);
	},
	
	dialog_batch_invoice: function (url, title, xy) {
		
		var result = Common.result();
		$.getJSON('finance.php?do=InItem.audit&item=151', function(json) {
			if (json.status == 1) {			
				var c = new Array();
				var d = new Array();
				$("input[name^='c_']").each(function() {
					if ($(this).attr("checked")) {
						var s = encodeURIComponent(this.name) + "=" + encodeURIComponent($(this).val());
						c.push(s);
						
						var n = $(this).attr("name");
						var a = n.split('_');
						d.push(a[3]);
					}
				});
				
				var cc = '';
				for (i = 0; i < d.length; i++) {
					if (cc.length > 0 && cc != d[i]) {
						alert("操作有误，必须选择同一客户的收入明细！");
						return false;
					}
					
					cc = d[i];
				}
				
				var body = c.join("&");
				
				$('#dialog_edit').dialog('option', 'buttons', {
					"关闭": function() { 
						$(this).dialog("close");
					},					
					
					"提交": function() {
						if (!confirm("确认是否提交？")) {
							return false;
						}
						
						var cc = InItem._cc();

						var form = $("#form_edit")[0];
						
						var body = {};
						body.cc = cc;
						body.invoice = form.invoice.value;
						body.date1 = form.date1.value;
						
						body.content = form.content.value;					
						body.status = 2;
						
						var url = 'finance.php?do=InItem.batch_invoicePost';
						var p2 = $.cookie('p2');
						if (p2 != null) {
							url += p2;
						}
						
						$(this).dialog("close");

						$.post(url, body, function(data) {
							$(result).html(data);
						});
					}
				});

				var view = '#dialog_edit';
				$.get(url, body, function(data) {
					$(view).html(data);
				});

				var regex = /^(\d+)(x)(\d+)$/;
				if (regex.test(xy)) {
					var cc = xy.split("x");
					var width = parseInt(cc[0]);
					var height = parseInt(cc[1]);
					$(view).dialog('option', 'height', height);
				} else {
					var width = parseInt(xy);
				}

				$(view).dialog('option', 'title', title);
				$(view).dialog('option', 'width', width);
				$(view).dialog('open');
			} else {
				_error();
			}
		});	
	},
	
	dialog_batch_begin: function (url, title, xy) {
		
		var result = Common.result();
		$.getJSON('finance.php?do=InItem.audit&item=151', function(json) {
			if (json.status == 1) {			
				var c = new Array();
				var d = new Array();
				$("input[name^='c_1_']").each(function() {
					if ($(this).attr("checked")) {
						var s = encodeURIComponent(this.name) + "=" + encodeURIComponent($(this).val());
						c.push(s);
						
						var n = $(this).attr("name");
						var a = n.split('_');
						d.push(a[3]);
					}
				});
				
				$("input[name^='c_2_']").each(function() {
					if ($(this).attr("checked")) {
						var s = encodeURIComponent(this.name) + "=" + encodeURIComponent($(this).val());
						c.push(s);
						
						var n = $(this).attr("name");
						var a = n.split('_');
						d.push(a[3]);
					}
				});
				
				var cc = '';
				for (i = 0; i < d.length; i++) {
					if (cc.length > 0 && cc != d[i]) {
						alert("操作有误，必须选择同一客户的收入明细！");
						return false;
					}
					
					cc = d[i];
				}
				
				var body = c.join("&");
				
				$('#dialog_edit').dialog('option', 'buttons', {
					"关闭": function() { 
						$(this).dialog("close");
					},					
					
					"开始收款": function() {
						if (!confirm("确认是否开始收款？")) {
							return false;
						}
						
						var cc = InItem._cc();

						var form = $("#form_edit")[0];
						
						var body = {};
						body.cc = cc;
						body.transaction = form.transaction.value;
						body.date = form.date.value;
						
						body.content = form.content.value;					
						body.status = 2;
						
						var url = 'finance.php?do=InItem.batch_beginPost';
						var p2 = $.cookie('p2');
						if (p2 != null) {
							url += p2;
						}
						
						$(this).dialog("close");

						$.post(url, body, function(data) {
							$(result).html(data);
						});
					}
				});

				var view = '#dialog_edit';
				$.get(url, body, function(data) {
					$(view).html(data);
				});

				var regex = /^(\d+)(x)(\d+)$/;
				if (regex.test(xy)) {
					var cc = xy.split("x");
					var width = parseInt(cc[0]);
					var height = parseInt(cc[1]);
					$(view).dialog('option', 'height', height);
				} else {
					var width = parseInt(xy);
				}

				$(view).dialog('option', 'title', title);
				$(view).dialog('option', 'width', width);
				$(view).dialog('open');
			} else {
				_error();
			}
		});	
	},
	
	dialog_batch_finish: function (url, title, xy) {
		var result = Common.result();
		$.getJSON('finance.php?do=InItem.audit&item=151', function(json) {
			if (json.status == 1) {			
				var c = new Array();
				var d = new Array();
				$("input[name^='c_1_']").each(function() {
					if ($(this).attr("checked")) {
						var s = encodeURIComponent(this.name) + "=" + encodeURIComponent($(this).val());
						c.push(s);
						
						var n = $(this).attr("name");
						var a = n.split('_');
						d.push(a[3]);
					}
				});
				
				$("input[name^='c_2_']").each(function() {
					if ($(this).attr("checked")) {
						var s = encodeURIComponent(this.name) + "=" + encodeURIComponent($(this).val());
						c.push(s);
						
						var n = $(this).attr("name");
						var a = n.split('_');
						d.push(a[3]);
					}
				});
								
				var cc = '';
				for (i = 0; i < d.length; i++) {
					if (cc.length > 0 && cc != d[i]) {
						alert("操作有误，必须选择同一客户的收入明细！");
						return false;
					}
					
					cc = d[i];
				}
				
				var body = c.join("&");
				
				$('#dialog_edit').dialog('option', 'buttons', {
					"关闭": function() { 
						$(this).dialog("close");
					},					
					
					"完成收款": function() {
						if (!confirm("确认是否完成收款？")) {
							return false;
						}
						
						var cc = InItem._cc();

						var form = $("#form_edit")[0];
						
						var body = {};
						body.cc = cc;
						body.transaction = form.transaction.value;
						body.date = form.date.value;
						
						body.content = form.content.value;					
						body.status = 3;
						
						var url = 'finance.php?do=InItem.batch_finishPost';
						var p2 = $.cookie('p2');
						if (p2 != null) {
							url += p2;
						}
						
						$(this).dialog("close");

						$.post(url, body, function(data) {
							$(result).html(data);
						});
					}
				});

				var view = '#dialog_edit';
				$.get(url, body, function(data) {
					$(view).html(data);
				});

				var regex = /^(\d+)(x)(\d+)$/;
				if (regex.test(xy)) {
					var cc = xy.split("x");
					var width = parseInt(cc[0]);
					var height = parseInt(cc[1]);
					$(view).dialog('option', 'height', height);
				} else {
					var width = parseInt(xy);
				}

				$(view).dialog('option', 'title', title);
				$(view).dialog('option', 'width', width);
				$(view).dialog('open');
			} else {
				_error();
			}
		});	
	},
	
	dialog_batch_check: function (url, title, xy) {
		var result = Common.result();
		$.getJSON('finance.php?do=InItem.audit&item=151', function(json) {
			if (json.status == 1) {			
				var c = new Array();				
				$("input[name^='c_3_']").each(function() {
					if ($(this).attr("checked")) {
						var s = encodeURIComponent(this.name) + "=" + encodeURIComponent($(this).val());
						c.push(s);
					}
				});
				
				var body = c.join("&");
				
				$('#dialog_edit').dialog('option', 'buttons', {
					"关闭": function() { 
						$(this).dialog("close");
					},					
					
					"完成对帐": function() {
						if (!confirm("确认是否完成对帐？")) {
							return false;
						}
						
						var cc = InItem._cc();

						var form = $("#form_edit")[0];
						
						var body = {};
						body.cc = cc;
						// body.transaction = form.transaction.value;
						// body.date = form.date.value;
						
						body.content = form.content.value;					
						body.status = 4;
						
						var url = 'finance.php?do=InItem.batch_checkPost';
						var p2 = $.cookie('p2');
						if (p2 != null) {
							url += p2;
						}
						
						$(this).dialog("close");

						$.post(url, body, function(data) {
							$(result).html(data);
						});
					}
				});

				var view = '#dialog_edit';
				$.get(url, body, function(data) {
					$(view).html(data);
				});

				var regex = /^(\d+)(x)(\d+)$/;
				if (regex.test(xy)) {
					var cc = xy.split("x");
					var width = parseInt(cc[0]);
					var height = parseInt(cc[1]);
					$(view).dialog('option', 'height', height);
				} else {
					var width = parseInt(xy);
				}

				$(view).dialog('option', 'title', title);
				$(view).dialog('option', 'width', width);
				$(view).dialog('open');
			} else {
				_error();
			}
		});	
	},
	
	_cc: function () {
		var c = new Array();
		$("input[name^='b_']").each(function() {
			if ($(this).attr("checked")) {
				c.push($(this).val());
			}
		});
		
		return c;
	}
};
